<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="sf"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<style >
#addVersionbt
{
border: 1px solid gray;
padding: 5px;
border-radius: 5px;
}
#addVersionbt:hover {
	cursor: pointer;
}
.updateVersionbt:hover {
	cursor: pointer;
}
</style>


<div class="right_col" role="main">


<div class="row">
	<div class="col-sm-12">
		<div
			style="position: absolute; height: 1px; width: 0px; overflow: hidden;">
			<input type="text" tabindex="0">
		</div>
		<table id="datatable-keytable"
			class="table table-striped table-bordered dataTable no-footer"
			role="grid" aria-describedby="datatable-keytable_info"
			style="position: relative;">
			<thead>
				<tr role="row">
					<th class="sorting_asc" tabindex="0"
						aria-controls="datatable-keytable" rowspan="1" colspan="1"
						style="width: 141.333px;" aria-sort="ascending"
						aria-label="Name: activate to sort column descending">软件名称</th>
					<th class="sorting" tabindex="0" aria-controls="datatable-keytable"
						rowspan="1" colspan="1" style="width: 236.333px;"
						aria-label="Position: activate to sort column ascending">版本号</th>
					<th class="sorting" tabindex="0" aria-controls="datatable-keytable"
						rowspan="1" colspan="1" style="width: 104.333px;"
						aria-label="Office: activate to sort column ascending">版本大小（M）</th>
					<th class="sorting" tabindex="0" aria-controls="datatable-keytable"
						rowspan="1" colspan="1" style="width: 52.3333px;"
						aria-label="Age: activate to sort column ascending">发布状态</th>
					<th class="sorting" tabindex="0" aria-controls="datatable-keytable"
						rowspan="1" colspan="1" style="width: 102.333px;"
						aria-label="Start date: activate to sort column ascending">APK文件下载</th>
					<th class="sorting" tabindex="0" aria-controls="datatable-keytable"
						rowspan="1" colspan="1" style="width: 78px;"
						aria-label="Salary: activate to sort column ascending">最近更新时间</th>
						<th class="sorting" tabindex="0" aria-controls="datatable-keytable"
						rowspan="1" colspan="1" style="width: 78px;"
						aria-label="Salary: activate to sort column ascending">操作</th>

				</tr>
			</thead>
			<tbody>
				<c:forEach var="item" items="${versions}">
					<tr role="row" class="odd">
						<td class="sorting_1">${thisapp.softwareName}</td>
						<td>${item.versionNo }</td>
						<td>${item.versionSize }</td>
						<c:if test="${item.publishStatus=='1' }">
							<td>不发布</td>
						</c:if>
						<c:if test="${item.publishStatus=='2' }">
							<td>已发布</td>
						</c:if>
						<c:if test="${item.publishStatus=='3' }">
							<td>预发布</td>
						</c:if>

						<td>${item.apklocPath }</td>
						<td>${item.modifyDate }</td>
						<td><p class="updateVersionbt" apklocPath="${item.apklocPath }" versionSize="${item.versionSize }"  versionInfo="${item.versionInfo}" versionNo="${item.versionNo }" vid="${item.id }">修改</p></td>
						
					</tr>
				</c:forEach>


			</tbody>
		</table>
	</div>

	<div class="x_panel">
		<div class="x_title">
			<h2 id="addVersionbt" >
				添加版本
			</h2>
			<ul class="nav navbar-right panel_toolbox">
				<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
				</li>
				<li class="dropdown"><a href="#" class="dropdown-toggle"
					data-toggle="dropdown" role="button" aria-expanded="false"><i
						class="fa fa-wrench"></i></a>
					<ul class="dropdown-menu" role="menu">
						<li><a href="#">Settings 1</a></li>
						<li><a href="#">Settings 2</a></li>
					</ul></li>
				<li><a class="close-link"><i class="fa fa-close"></i></a></li>
			</ul>
			<div class="clearfix"></div>
		</div>
		<div class="x_content">
		<h2 id="func-title" style="text-align: center;">增加版本</h2>
			<br>
			<form  class="form-horizontal form-label-left row versionform"
				action="${initParam.url}/dev/addVersion" method="post">


				<div class="form-group col-md-12 col-sm-12 col-xs-12">
					<label class="control-label col-md-2 col-sm-2 col-xs-12">APP-ID</label>
					<div class="col-md-9 col-sm-9 col-xs-12">
						<input type="text" class="form-control"
							placeholder="Default Input" value="${thisapp.id }" readonly="readonly" name="appId">
					</div>
				</div>
				<div class="form-group col-md-12 col-sm-12 col-xs-12">
					<label class="control-label col-md-2 col-sm-2 col-xs-12">Version-ID</label>
					<div class="col-md-9 col-sm-9 col-xs-12">
						<input type="text" class="form-control" 
							placeholder="Default Input" value="${thisapp.id }" readonly="readonly" name="id">
					</div>
				</div>
				<div class="form-group col-md-12 col-sm-12 col-xs-12">
					<label class="control-label col-md-2 col-sm-2 col-xs-12">版本号</label>
					<div class="col-md-9 col-sm-9 col-xs-12">
						<input type="text" class="form-control"
							name="versionNo" value="def">
					</div>
				</div>


				<div class="form-group col-md-12 col-sm-12 col-xs-12">
					<label class="control-label col-md-2 col-sm-2 col-xs-12">版本大小</label>
					<div class="col-md-9 col-sm-9 col-xs-12">
						<input type="text" class="form-control"
							placeholder="Default Input" name="versionSize">
					</div>
				</div>
				<div class="form-group col-md-12 col-sm-12 col-xs-12">
					<label class="control-label col-md-2 col-sm-2 col-xs-12">发布状态</label>
					<div class="col-md-9 col-sm-9 col-xs-12">
						<input type="text" class="form-control"
							placeholder="Default Input" readonly="readonly" name="devId"
							value="预发布">
					</div>
				</div>




				<div class="form-group col-md-12 col-sm-12 col-xs-12">
					<label class="control-label col-md-2 col-sm-2 col-xs-12">应用简介</label>
					<div class="col-md-9 col-sm-9 col-xs-12">
						<textarea type="text" class="form-control"
							placeholder="Default Input" name="versionInfo">
								
								</textarea>
					</div>
				</div>
				<div class="form-group col-md-12 col-sm-12 col-xs-12">
					<label class="control-label col-md-2 col-sm-2 col-xs-12">logo</label>
					<div class="col-md-6 col-sm-6 col-xs-12">
						<input type="file" placeholder="Default Input" name="logoPicPath"
							value="">
					</div>
				</div>



				<section class="clear"></section>
				<div class="ln_solid"></div>
				<div class="form-group">
					<div class="col-md-9 col-sm-9 col-xs-12 col-md-offset-1">
						<input type="submit" class="btn btn-primary" value="保存"></input>

					</div>
				</div>



			</form>
		</div>

	</div>



</div>
</div>
